var controllerVue = new Vue({
    el:'#controllerVue',
    data:{
    	switch12:'010F0000001002FFFFE390',
    	closes:'010F00000010020000E220',
    	switch122:'01050001FF00DDFA',
    	closeB:'0105000100009C0A',
        localIPList:[] //本机iplist

    },
    mounted:function () {
      var _this = this;
//      _this.getCom();
    },
    methods: {
    	switch1:function(){
    		var _this = this;
    		var url = "sendmsg";
			var param = {
				"msg": _this.switch12
			};
			$.ajax({
				type: "POST",
				url: baseURL + url,
				contentType: "application/json",
				data: JSON.stringify(param),
				success: function (r) {
					//vm.$Spin.hide();
					if (r.code === 0) {
						alert('操作成功', function (index) {
							
						});
					} else {
						alert(r.msg);
					}
				}
			});
    	},
    	close1:function(){
    		var _this = this;
    		var url = "sendmsg";
			var param = {
				"msg": _this.closes
			};
			$.ajax({
				type: "POST",
				url: baseURL + url,
				contentType: "application/json",
				data: JSON.stringify(param),
				success: function (r) {
					//vm.$Spin.hide();
					if (r.code === 0) {
						alert('操作成功', function (index) {
							
						});
					} else {
						alert(r.msg);
					}
				}
			});
    	},
    	switch2:function(){
    		var _this = this;
    		var url = "sendmsg";
			var param = {
				"msg": _this.switch122
			};
			$.ajax({
				type: "POST",
				url: baseURL + url,
				contentType: "application/json",
				data: JSON.stringify(param),
				success: function (r) {
					//vm.$Spin.hide();
					if (r.code === 0) {
						alert('操作成功', function (index) {
							
						});
					} else {
						alert(r.msg);
					}
				}
			});
    	},
    	close2:function(){
    		var _this = this;
    		var url = "sendmsg";
			var param = {
				"msg": _this.closeB
			};
			$.ajax({
				type: "POST",
				url: baseURL + url,
				contentType: "application/json",
				data: JSON.stringify(param),
				success: function (r) {
					//vm.$Spin.hide();
					if (r.code === 0) {
						alert('操作成功', function (index) {
							
						});
					} else {
						alert(r.msg);
					}
				}
			});
    	},
    }
});